﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="using:EString.ImageStack"
	mc:Ignorable="d"
    x:Name="userControl"
	x:Class="EString.ImageStack.ImageStackContainer"
	d:DesignWidth="723" d:DesignHeight="654">
    <UserControl.Resources>

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="ms-appx:///Symmetry/Themes/Generic.xaml"/>
                <ResourceDictionary Source="../Resources/GlobalResources.xaml"/>            
            </ResourceDictionary.MergedDictionaries>

            <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="Gray"/>            
            <SolidColorBrush x:Key="TextBrush" Color="#FFECECEC"/>            
            <SolidColorBrush x:Key="GlobalForeground_Brush" Color="#FFECECEC"/>
            
            <!--<RadialGradientBrush x:Key="TVIsolateBrush" GradientOrigin="-0.248,1.311" RadiusX="0.801" RadiusY="0.866">
                <GradientStop Color="#BF8A8A8A"/>
                <GradientStop Color="#BFFFFFFF" Offset="1"/>
            </RadialGradientBrush>-->
            
            <LinearGradientBrush x:Key="TVIsolateBrush" >
                <GradientStop Color="#BF8A8A8A"/>
                <GradientStop Color="#BFFFFFFF" Offset="1"/>
            </LinearGradientBrush>
            
            <Style x:Key="ZoomControls_Button" TargetType="Button">
                <Setter Property="Background" Value="#FF1F3B53" />
                <Setter Property="Foreground" Value="#FF000000" />
                <Setter Property="Padding" Value="3" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0" />
                            <GradientStop Color="#FF8399A9" Offset="0.375" />
                            <GradientStop Color="#FF718597" Offset="0.375" />
                            <GradientStop Color="#FF617584" Offset="1" />
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Grid x:Name="grid">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition GeneratedDuration="00:00:00.3000000" />
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Normal">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="pressEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.19" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused" />
                                        <VisualState x:Name="Unfocused" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border BorderThickness="0" />
                                <TextBlock TextWrapping="Wrap" Text="{TemplateBinding Content}" d:LayoutOverrides="Width, Height" Foreground="#FFE7E7E7"/>
                                <Rectangle x:Name="mouseOverEffect" StrokeThickness="1"  Margin="1" RadiusX="2" RadiusY="2" Opacity="0">
                                    <Rectangle.Stroke>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#C0353535" Offset="1" />
                                            <GradientStop Color="Transparent" Offset="0.127" />
                                        </LinearGradientBrush>
                                    </Rectangle.Stroke>
                                </Rectangle>
                                <Rectangle x:Name="pressEffect" StrokeThickness="1" Margin="1" RadiusX="3" RadiusY="3" Stroke="#FF616161" Opacity="0">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush >
                                            <GradientStop Color="#59FFFFFF" />
                                            <GradientStop Color="Transparent" Offset="1" />
                                            <GradientStop Color="#26FFFFFF" Offset="0.467" />
                                            <GradientStop Color="Transparent" Offset="0.777" />
                                        </LinearGradientBrush >
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="HyperlinkButtonStyle1" TargetType="HyperlinkButton">
                <Setter Property="Foreground" Value="#FF73A9D8"/>
                <Setter Property="Padding" Value="2,0,2,0"/>                
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                <Setter Property="VerticalContentAlignment" Value="Top"/>
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="HyperlinkButton">
                            <Grid Background="{TemplateBinding Background}" >
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver"/>
                                        <VisualState x:Name="Pressed"/>
                                        <VisualState x:Name="Disabled"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused"/>
                                        <VisualState x:Name="Unfocused"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="ToggleButtonStyle_Toolbar" TargetType="ToggleButton">
                <Setter Property="Background" Value="#FF1F3B53" />
                <Setter Property="Foreground" Value="#FF000000" />
                <Setter Property="Padding" Value="3" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0" />
                            <GradientStop Color="#FF8399A9" Offset="0.375" />
                            <GradientStop Color="#FF718597" Offset="0.375" />
                            <GradientStop Color="#FF617584" Offset="1" />
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ToggleButton">
                            <Grid Margin="4,2" d:DesignWidth="159" d:DesignHeight="40">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition GeneratedDuration="00:00:00">
                                                <VisualTransition.GeneratedEasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn" Exponent="5" />
                                                </VisualTransition.GeneratedEasingFunction>
                                            </VisualTransition>
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Normal" />
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="pressEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Disabled" />
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="CheckStates">
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition GeneratedDuration="00:00:00.3000000">
                                                <VisualTransition.GeneratedEasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn" />
                                                </VisualTransition.GeneratedEasingFunction>
                                            </VisualTransition>
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Checked">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="toggle2" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Unchecked" />
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused" />
                                        <VisualState x:Name="Unfocused" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border BorderThickness="0" />
                                <ContentPresenter />
                                <TextBlock VerticalAlignment="Center" Text="{TemplateBinding Content}" TextWrapping="Wrap" Foreground="#FFFCFCF0" Margin="16,0,0,0" HorizontalAlignment="Left" />
                                <Canvas x:Name="toggle2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="0" Opacity="0" Margin="0,0,10,0">
                                    <Ellipse Fill="Orange" StrokeEndLineCap="Triangle" StrokeStartLineCap="Triangle" StrokeThickness="2" Height="4" Width="4" Canvas.Left="7" VerticalAlignment="Bottom" HorizontalAlignment="Right" Canvas.Top="-3" />
                                </Canvas>
                                <Rectangle x:Name="mouseOverEffect" StrokeThickness="1"  Margin="1" RadiusX="2" RadiusY="2" Opacity="0">
                                    <Rectangle.Stroke>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#C0353535" Offset="1" />
                                            <GradientStop Color="Transparent" Offset="0.127" />
                                        </LinearGradientBrush>
                                    </Rectangle.Stroke>
                                </Rectangle>
                                <Rectangle x:Name="pressEffect" StrokeThickness="1" Margin="1" Stroke="#FF616161" RadiusX="3" RadiusY="3" Opacity="0">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush >
                                            <GradientStop Color="#59FFFFFF" />
                                            <GradientStop Color="Transparent" Offset="1" />
                                            <GradientStop Color="#26FFFFFF" Offset="0.467" />
                                            <GradientStop Color="Transparent" Offset="0.777" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ButtonStyle2" TargetType="Button">
                <Setter Property="Background" Value="#FF1F3B53" />
                <Setter Property="Foreground" Value="#FF000000" />
                <Setter Property="Padding" Value="3" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0" />
                            <GradientStop Color="#FF8399A9" Offset="0.375" />
                            <GradientStop Color="#FF718597" Offset="0.375" />
                            <GradientStop Color="#FF617584" Offset="1" />
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Grid x:Name="grid">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition GeneratedDuration="00:00:00.3000000" />
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Normal">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="pressEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.19" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused" />
                                        <VisualState x:Name="Unfocused" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border Background="#00525252" BorderThickness="0" />
                                <ContentPresenter />
                                <Rectangle x:Name="mouseOverEffect" StrokeThickness="1"  Margin="1" RadiusX="2" RadiusY="2" Opacity="0">
                                    <Rectangle.Stroke>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#C0353535" Offset="1" />
                                            <GradientStop Color="Transparent" Offset="0.127" />
                                        </LinearGradientBrush>
                                    </Rectangle.Stroke>
                                </Rectangle>
                                <Rectangle x:Name="pressEffect" StrokeThickness="1" Margin="1" RadiusX="3" RadiusY="3" Stroke="#FF616161" Opacity="0">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush >
                                            <GradientStop Color="#59FFFFFF" />
                                            <GradientStop Color="Transparent" Offset="1" />
                                            <GradientStop Color="#26FFFFFF" Offset="0.467" />
                                            <GradientStop Color="Transparent" Offset="0.777" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Storyboard x:Name="sbShowAll">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="viewbox">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-90"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0" Value="80"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationY)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0" Value="3"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0" Value="3"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="MenuTop">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="-90"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:1.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Name="sbHideAll">
                <DoubleAnimation Duration="0:0:0.4" To="-90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="viewbox" d:IsOptimized="True"/>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="80"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.199951"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationY)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.199951"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="3"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="3"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
                    <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.86"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Style x:Key="TextBoxStyle1" TargetType="TextBox">
                <Setter Property="MinWidth" Value="{StaticResource TextControlThemeMinWidth}"/>
                <Setter Property="MinHeight" Value="{StaticResource TextControlThemeMinHeight}"/>
                <Setter Property="Foreground" Value="{StaticResource TextBoxForegroundThemeBrush}"/>
                <Setter Property="Background" Value="{StaticResource TextBoxBackgroundThemeBrush}"/>
                <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderThemeBrush}"/>
                <Setter Property="BorderThickness" Value="{StaticResource TextControlBorderThemeThickness}"/>
                <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
                <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
                <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
                <Setter Property="Padding" Value="{StaticResource TextControlThemePadding}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="TextBox">
                            <Grid>
                                <Grid.Resources>
                                    <Style x:Name="DeleteButtonStyle" TargetType="Button">
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="Button">
                                                    <Grid>
                                                        <VisualStateManager.VisualStateGroups>
                                                            <VisualStateGroup x:Name="CommonStates">
                                                                <VisualState x:Name="Normal"/>
                                                                <VisualState x:Name="PointerOver">
                                                                    <Storyboard>
                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBackgroundThemeBrush}"/>
                                                                        </ObjectAnimationUsingKeyFrames>
                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBorderThemeBrush}"/>
                                                                        </ObjectAnimationUsingKeyFrames>
                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="GlyphElement">
                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverForegroundThemeBrush}"/>
                                                                        </ObjectAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </VisualState>
                                                                <VisualState x:Name="Pressed">
                                                                    <Storyboard>
                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBackgroundThemeBrush}"/>
                                                                        </ObjectAnimationUsingKeyFrames>
                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBorderThemeBrush}"/>
                                                                        </ObjectAnimationUsingKeyFrames>
                                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="GlyphElement">
                                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedForegroundThemeBrush}"/>
                                                                        </ObjectAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </VisualState>
                                                                <VisualState x:Name="Disabled">
                                                                    <Storyboard>
                                                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
                                                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
                                                                    </Storyboard>
                                                                </VisualState>
                                                            </VisualStateGroup>
                                                        </VisualStateManager.VisualStateGroups>
                                                        <Border x:Name="BorderElement" BorderBrush="{StaticResource TextBoxButtonBorderThemeBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                                        <Border x:Name="BackgroundElement" Background="{StaticResource TextBoxButtonBackgroundThemeBrush}" Margin="{TemplateBinding BorderThickness}">
                                                            <TextBlock x:Name="GlyphElement" Foreground="{StaticResource TextBoxButtonForegroundThemeBrush}" FontFamily="{StaticResource SymbolThemeFontFamily}" HorizontalAlignment="Center" Text="&#xE0A4;" VerticalAlignment="Center"/>
                                                        </Border>
                                                    </Grid>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Grid.Resources>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledBackgroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledBorderThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentElement">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledForegroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Normal">
                                            <Storyboard>
                                                <DoubleAnimation Duration="0" To="{StaticResource TextControlBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
                                                <DoubleAnimation Duration="0" To="{StaticResource TextControlBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="PointerOver">
                                            <Storyboard>
                                                <DoubleAnimation Duration="0" To="{StaticResource TextControlPointerOverBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
                                                <DoubleAnimation Duration="0" To="{StaticResource TextControlPointerOverBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Focused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="ButtonStates">
                                        <VisualState x:Name="ButtonVisible">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DeleteButton">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="ButtonCollapsed"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Width="37" Height="34" Margin="0,0,0,7"/>
                                <Border x:Name="BorderElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2"/>
                                <ScrollViewer x:Name="ContentElement" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="Disabled"/>
                                <Button x:Name="DeleteButton" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" FontSize="{TemplateBinding FontSize}" IsTabStop="False" Style="{StaticResource DeleteButtonStyle}" Visibility="Collapsed" VerticalAlignment="Stretch"/>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

        </ResourceDictionary>


    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStateGroup" >
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0:0:0.6">
                        <VisualTransition.GeneratedEasingFunction>
                            <CircleEase EasingMode="EaseIn"/>
                        </VisualTransition.GeneratedEasingFunction>
                    </VisualTransition>
                    <VisualTransition GeneratedDuration="0:0:0.5" To="Menu">
                        <VisualTransition.GeneratedEasingFunction>
                            <BackEase EasingMode="EaseOut"/>
                        </VisualTransition.GeneratedEasingFunction>
                    </VisualTransition>
                    <VisualTransition From="Menu" GeneratedDuration="0:0:0.3"/>
                    <VisualTransition GeneratedDuration="0:0:1" To="h2"/>
                    <VisualTransition From="h2" GeneratedDuration="0:0:1"/>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="Normal">
                	<Storyboard>
                		<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="GuidanceGrid">
                			<DiscreteObjectKeyFrame KeyTime="0">
                				<DiscreteObjectKeyFrame.Value>
                					<Thickness>226,24,0,117</Thickness>
                				</DiscreteObjectKeyFrame.Value>
                			</DiscreteObjectKeyFrame>
                		</ObjectAnimationUsingKeyFrames>
                	</Storyboard>
                </VisualState>
                <VisualState x:Name="Guidance">
                    <Storyboard>
                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="GuidanceGrid" d:IsOptimized="True"/>
                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="GuidanceGrid" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Menu">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="MenuTop">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>11,6,4,30</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="MenuTop" d:IsOptimized="True"/>
                        <DoubleAnimation Duration="0" To="-17" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="MenuTab" d:IsOptimized="True"/>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="btnClose">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>129,89,0,0</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Visible">
                    <Storyboard>
                        <DoubleAnimation Duration="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="grid" d:IsOptimized="True" To="0"/>
                        <DoubleAnimation Duration="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationY)" Storyboard.TargetName="grid" d:IsOptimized="True" To="0"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="h2">
                    <Storyboard>
                        <DoubleAnimation Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="viewbox" d:IsOptimized="True" To="-90"/>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="grid">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="80"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="grid">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.199951"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationY)" Storyboard.TargetName="grid">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.199951"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="grid">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="3"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="grid">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="3"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.86"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="userControl">
                            <DiscreteObjectKeyFrame KeyTime="0:0:1.1">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Hidden">
                	<Storyboard>
                		<DoubleAnimation Duration="0" To="90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
                	</Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <local:ImageStackVert2 x:Name="isMain"  VerticalAlignment="Center" HorizontalAlignment="Center"  >
        	<local:ImageStackVert2.RenderTransform>
        		<CompositeTransform/>
        	</local:ImageStackVert2.RenderTransform>
        </local:ImageStackVert2>
        <Grid Margin="0" d:LayoutOverrides="Height" >
            <Grid x:Name="grid" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="27,89,0,0" Opacity="0.765" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform/>
                </Grid.RenderTransform>
                <Grid.Projection>
                    <PlaneProjection/>
                </Grid.Projection>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Rectangle Grid.RowSpan="2" Grid.ColumnSpan="2" Fill="#8E000000" Margin="-4,-10,-9,18"/>
                <Border x:Name="MenuTop" Grid.Column="1" Grid.RowSpan="2" Margin="40,6,1,30" Background="#CF000000" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" >
                    <Border.Projection>
                        <PlaneProjection/>
                    </Border.Projection>
                    <Border.RenderTransform>
                        <CompositeTransform/>
                    </Border.RenderTransform>
                    <Grid Margin="4,4,0,4">
                        <StackPanel Margin="4,0,4,8">
                            <ToggleButton x:ConnectionId='1' x:Name="btnScrim_Copy" Width="43" Height="41" Background="#E56E6E6E" HorizontalAlignment="Center" Margin="0,8,0,0"                         >
                                <ToolTipService.ToolTip>
                                    <ToolTip  Content="Show/Hide the scrim (makes the content more visible)" />
                                </ToolTipService.ToolTip>
                            </ToggleButton>
                            <ToggleButton x:ConnectionId='2' x:Name="btnScrim_Copy1"                        Width="43" Height="41" Background="#E5608CEC" HorizontalAlignment="Center" Margin="0,8,0,0"  >
                                <ToolTipService.ToolTip>
                                    <ToolTip  Content="Show/Hide the scrim (makes the content more visible)" />
                                </ToolTipService.ToolTip>
                            </ToggleButton>
                            <ToggleButton x:ConnectionId='3' x:Name="btnScrim"                        Width="43" Height="41" Background="#E5CD853F" HorizontalAlignment="Center" Margin="0,8,0,0"  >
                                <ToolTipService.ToolTip>
                                    <ToolTip  Content="Show/Hide the scrim (makes the content more visible)" />
                                </ToolTipService.ToolTip>
                            </ToggleButton>
                            <TextBox x:Name="tbLevelMax" TextWrapping="Wrap"  Text="10"  Width="43"  TextAlignment="Center" Margin="2,11,3,0" Background="#FF666666" Foreground="White" BorderBrush="{x:Null}" Height="41" VerticalAlignment="Center" HorizontalAlignment="Center" Style="{StaticResource TextBoxStyle1}">
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="The max level to which to build out the visual tree." />
                                </ToolTipService.ToolTip>
                            </TextBox>
                            <Button x:ConnectionId='4' x:Name="btnReset"                        HorizontalAlignment="Stretch" Width="43" Height="41" Margin="0,5,0,0">
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="Reset the Visual Tree Graph overlay (resets the offsets, zoom, etc)." />
                                </ToolTipService.ToolTip>
                                <Canvas Height="23" Margin="0,0,15,0" HorizontalAlignment="Center">
                                    <Path x:Name="path"  Stretch="Fill" StrokeThickness="1" Height="12.336" Width="14.22" RenderTransformOrigin="0.391132059996278,0.499999993554126" UseLayoutRounding="False" Canvas.Left="5.659" Canvas.Top="8" Data="M1.3369199,0.00017032787 C2.7445416,0.016840866 4.6797929,1.2547961 4.9160595,2.6248412 L4.9228449,2.6686399 L6.3150024,2.8130002 C5.4936519,3.9241002 4.1598763,4.7970629 3.1060026,4.9790001 L3.1697667,4.9332409 L3.1531742,4.9410615 C3.083631,4.9731035 3.011775,5.0047574 2.9375579,5.0359998 C3.0991738,4.9531698 3.2419915,4.8657541 3.3671646,4.7747169 L3.4099686,4.7427702 L3.4395831,4.717463 C3.5712318,4.6017981 3.6933227,4.4786172 3.8044314,4.3510962 L3.8419354,4.3068924 L3.8611643,4.2794538 C4.9210773,2.7126427 2.1822269,0.66839182 0,1.7860503 C0,1.7860503 0.68738663,0.098651268 0.68738663,0.098651305 C0.8823691,0.028537981 1.1023163,-0.0026081621 1.3369199,0.00017032787 z" Fill="White">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleY="0.9" ScaleX="0.9" />
                                                <SkewTransform AngleX="0" AngleY="0" />
                                                <RotateTransform Angle="180" />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path x:Name="path1"  Stretch="Fill" StrokeThickness="1" Height="12.336" Width="14.221" RenderTransformOrigin="0.391132059996278,0.499999993554126" UseLayoutRounding="False" Canvas.Left="5.656" Canvas.Top="2.592" Data="M1.3369199,0.00017032787 C2.7445416,0.016840866 4.6797929,1.2547961 4.9160595,2.6248412 L4.9228449,2.6686399 L6.3150024,2.8130002 C5.4936519,3.9241002 4.1598763,4.7970629 3.1060026,4.9790001 L3.1697667,4.9332409 L3.1531742,4.9410615 C3.083631,4.9731035 3.011775,5.0047574 2.9375579,5.0359998 C3.0991738,4.9531698 3.2419915,4.8657541 3.3671646,4.7747169 L3.4099686,4.7427702 L3.4395831,4.717463 C3.5712318,4.6017981 3.6933227,4.4786172 3.8044314,4.3510962 L3.8419354,4.3068924 L3.8611643,4.2794538 C4.9210773,2.7126427 2.1822269,0.66839182 0,1.7860503 C0,1.7860503 0.68738663,0.098651268 0.68738663,0.098651305 C0.8823691,0.028537981 1.1023163,-0.0026081621 1.3369199,0.00017032787 z" Fill="White">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="0.9" ScaleY="0.9" />
                                                <SkewTransform />
                                                <RotateTransform />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Canvas>
                            </Button>
                            <Button x:ConnectionId='5' x:Name="btnHide"                       Margin="0,8,0,0" Width="43" Height="41" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="Hide the Visual Tree Graph" />
                                </ToolTipService.ToolTip>
                                <Canvas Height="22" Width="22" Margin="0,0,12,0" d:LayoutOverrides="Height">
                                    <Path Stretch="Fill"  StrokeThickness="0.5" Height="17.704" Width="17.5" UseLayoutRounding="False" Canvas.Top="2.273" Data="M40.75,113.75 C40.75,113.19772 41.133179,112.75 41.605854,112.75 L87.394142,112.75 C87.866821,112.75 88.25,113.19772 88.25,113.75 L88.25,143.25 C88.25,143.80228 87.866821,144.25 87.394142,144.25 L41.605854,144.25 C41.133179,144.25 40.75,143.80228 40.75,143.25 z M64.75,112.75 L64.75,96.75 M120.25,113.75 C120.25,113.19772 120.63318,112.75 121.10586,112.75 L166.89415,112.75 C167.36682,112.75 167.75,113.19772 167.75,113.75 L167.75,143.25 C167.75,143.80228 167.36682,144.25 166.89415,144.25 L121.10586,144.25 C120.63318,144.25 120.25,143.80228 120.25,143.25 z M144.25,112.75 L144.25,96.75 M64.75,96.75 L144.75,96.75 M104.75,96.75 L104.75,72.75 M0.25,41.25 C0.25,40.697716 0.63317972,40.25 1.1058559,40.25 L46.894146,40.25 C47.366821,40.25 47.75,40.697716 47.75,41.25 L47.75,70.75 C47.75,71.302284 47.366821,71.75 46.894146,71.75 L1.1058559,71.75 C0.63317972,71.75 0.25,71.302284 0.25,70.75 z M24.25,40.25 L24.25,24.25 M79.75,41.25 C79.75,40.697716 80.133179,40.25 80.605858,40.25 L126.39414,40.25 C126.86682,40.25 127.25,40.697716 127.25,41.25 L127.25,70.75 C127.25,71.302284 126.86682,71.75 126.39414,71.75 L80.605858,71.75 C80.133179,71.75 79.75,71.302284 79.75,70.75 z M103.75,40.25 L103.75,24.25 M24.25,24.25 L104.25,24.25 M64.25,24.25 L64.25,0.25" Canvas.Left="4.004" />
                                    <Path Data="M18.5,6 L22,2.2730026" Height="4.227" Canvas.Left="18.5" Stretch="Fill" Stroke="Red" StrokeThickness="0.5" Canvas.Top="2.273" UseLayoutRounding="False" Width="4"/>
                                    <Path Data="M18.5,6 L22,2.2730026" Height="4.227" Canvas.Left="18.5" Stretch="Fill" Stroke="Red" StrokeThickness="0.5" Canvas.Top="2.273" UseLayoutRounding="False" Width="4" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform Angle="-90"/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Canvas>
                            </Button>
                            <ToggleButton x:ConnectionId='6' x:Name="btnToggleHelp"  Margin="0,8,0,0"                             Width="43" Height="41" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="Show/Hide help" />
                                </ToolTipService.ToolTip>
                                <TextBlock TextWrapping="Wrap" Text="?" HorizontalAlignment="Center" d:LayoutOverrides="Height" />
                            </ToggleButton>
                            <Button x:ConnectionId='7' x:Name="btnClose" Content="X" HorizontalAlignment="Center" VerticalAlignment="Top"                        Width="41" Height="43" Margin="0,8,0,0" FontSize="10.667"/>
                        </StackPanel>
                    </Grid>
                </Border>
                <Grid x:Name="MenuTab" HorizontalAlignment="Left" Height="16" VerticalAlignment="Top" Width="58" Grid.RowSpan="2" Grid.Column="1" Margin="-21,37,0,0" RenderTransformOrigin="0.5,0.5" Background="#B1000000" Visibility="Collapsed">
                    <Grid.RenderTransform>
                        <CompositeTransform Rotation="90"/>
                    </Grid.RenderTransform>
                    <TextBlock TextWrapping="Wrap" Text="OPTIONS" d:LayoutOverrides="Width, Height" Foreground="#FFEDEDED" FontSize="8" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                </Grid>
                <Viewbox x:Name="viewbox" Height="200" VerticalAlignment="Top" >
                    <Viewbox.Projection>
                        <PlaneProjection/>
                    </Viewbox.Projection>
                    <Border x:Name="Controls" Background="White" Height="200" Width="300" MinWidth="300" MinHeight="200" Visibility="Collapsed" >
                        <Border.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="Black" Offset="0"/>
                                <GradientStop Color="#FFD8D8D8" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                        <Grid>
                            <local:ImageStackVert2 x:Name="isMini" d:LayoutOverrides="Width, Height"  />
                            <Canvas x:Name="reticleCanvas">
                                <Border x:Name="reticle" Height="100"  Width="200"  Background="Transparent" Canvas.Left="50" Canvas.Top="50"  BorderBrush="#FFD22828" BorderThickness="1.5">
                                    <Ellipse StrokeThickness="0.8" Width="3" Height="3" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="Red"/>
                                </Border>
                            </Canvas>
                        </Grid>

                    </Border>
                </Viewbox>
                <Slider x:Name="zoomSlider" Maximum="10"  RenderTransformOrigin="0.5,0.5" Grid.ColumnSpan="2" Minimum="0.01"
        			Value="{Binding MyDragBehavior.ScaleTransformValue, ElementName=userControl, Mode=TwoWay}" LargeChange="1" SmallChange="0.1" Orientation="Vertical" HorizontalAlignment="Left" Margin="-4,20,0,41" StepFrequency="0.1"/>
            </Grid>
            <Grid x:Name="GuidanceGrid" Margin="226,24,0,117" IsHitTestVisible="False" HorizontalAlignment="Left" Height="339" Opacity="0">
                <Grid.Projection>
                    <PlaneProjection RotationY="-90"/>
                </Grid.Projection>
                <Grid.Background>
                    <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                        <GradientStop Color="White" Offset="0"/>
                        <GradientStop Color="#FFDADADA" Offset="1"/>
                    </LinearGradientBrush>
                </Grid.Background>
                <Border BorderThickness="1" HorizontalAlignment="Right" Margin="8">
                    <StackPanel Orientation="Vertical" Width="205" d:LayoutOverrides="Height">
                        <TextBlock TextWrapping="Wrap" Text="Click the scrim button if you need more contrast between the tree nodes and the background" Foreground="Black"/>
                        <TextBlock TextWrapping="Wrap" Text="Reset the reticle position and zoom to the original values via the reset button in the VTG Control Panel" Margin="0,6,0,0" Foreground="Black"/>
                        <TextBlock TextWrapping="Wrap" Text="If you're having trouble seeing the magnification, try resizing the reticle by dragging the orange bubble on the bottom right hand corner OR resizing the whole tree using the slider in the control panel (top left corner of the screen)." Margin="0,6,0,0" Foreground="Black"/>
                        <HyperlinkButton  NavigateUri="http://www.estringsoftware.com" d:LayoutOverrides="Width" Margin="0,6,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch">
                            <TextBlock TextWrapping="Wrap" Foreground="Black" FontSize="12" Margin="-11,0"><Run Text="Check out estring on the web at "/><LineBreak/><Run Foreground="CornflowerBlue" Text="http://www.estringsoftware.com"/><Run Text=" for more."/></TextBlock>
                        </HyperlinkButton>
                    </StackPanel>
                </Border>
            </Grid>
        </Grid>
        <Ellipse x:Name="centerpoint" StrokeThickness="2.5" Width="45" Height="45" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="0.285" StrokeDashArray="0.5 0 1" Stroke="Red" RenderTransformOrigin="0.5,0.5">
            <Ellipse.RenderTransform>
                <CompositeTransform Rotation="{Binding Value, ElementName=zoomSlider}"/>
            </Ellipse.RenderTransform>
        </Ellipse>
    </Grid>
</UserControl>

